//
//  AceListHeader.m
//  APP_login
//
//  Created by edz on 7/28/21.
//  Copyright © 2021 baicai. All rights reserved.
//

#import "AceListHeader.h"
#import "Masonry.h"

@implementation AceListHeader

/*
// Only override drawRect: if you perform custom drawing.
// An empty implementation adversely affects performance during animation.
- (void)drawRect:(CGRect)rect {
    // Drawing code
}
*/
- (instancetype) initWithReuseIdentifier:(NSString *)reuseIdentifier{
    self = [super initWithReuseIdentifier:reuseIdentifier];
    if (self) {
        UIImageView *imageView = [[UIImageView alloc] initWithImage:[UIImage imageNamed:@"calendar"]];
        [self.contentView addSubview: imageView];
        [imageView mas_makeConstraints:^(MASConstraintMaker *make){
            make.top.mas_offset(12);
            make.left.mas_offset(20);
            make.size.mas_equalTo(CGSizeMake(25, 20));
        }];
        
        UILabel *dayLable = [[UILabel alloc] init];
        [self.contentView addSubview: dayLable];
        [dayLable mas_makeConstraints:^(MASConstraintMaker *make){
            make.top.mas_equalTo(0);
            make.left.mas_equalTo(55);
            make.size.mas_equalTo(CGSizeMake(50, 35));
        }];
        dayLable.text = @"30";
        dayLable.font = [UIFont fontWithName:@"Helvetica-Bold" size:40];
        dayLable.textColor = [UIColor whiteColor];
        
        UILabel *slashLable = [UILabel new];
        [self.contentView addSubview: slashLable];
        [slashLable mas_makeConstraints:^(MASConstraintMaker *make){
            make.top.mas_equalTo(0);
            make.left.mas_equalTo(105);
            make.size.mas_equalTo(CGSizeMake(25, 40));
        }];
        slashLable.text = @"/";
        slashLable.font = [UIFont fontWithName:@"Helvetica-Bold" size:33];
        slashLable.textColor = [UIColor whiteColor];
        slashLable.textAlignment = NSTextAlignmentCenter;
        
        UILabel *monthLable = [UILabel new];
        [self.contentView addSubview: monthLable];
        [monthLable mas_makeConstraints:^(MASConstraintMaker *make){
            make.top.mas_equalTo(12);
            make.left.mas_equalTo(135);
            make.size.mas_equalTo(CGSizeMake(15, 20));
        }];
        monthLable.text = @"3";
        monthLable.font = [UIFont fontWithName:@"Helvetica-Bold" size:25];
        monthLable.textColor = [UIColor whiteColor];
        
        UILabel *textLable = [UILabel new];
        [self.contentView addSubview: textLable];
        [textLable mas_makeConstraints:^(MASConstraintMaker *make){
            make.top.mas_equalTo(45);
            make.left.mas_equalTo(20);
            make.size.mas_equalTo(CGSizeMake(160, 20));
        }];
        textLable.text = @"牛人榜每日9:00更新";
        textLable.font = [UIFont fontWithName:@"Helvetica-Bold" size:16];
        textLable.textColor = [UIColor whiteColor];
    }
    return self;
}

@end
